package com.maimao.kill.job;

import com.maimao.kill.service.TestService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author wangmaolin1
 * @date 2021/9/23 下午2:55
 */
@Component
@Slf4j
public class Testjob2 {

    @Autowired
    private TestService testService;

    @XxlJob("testJobHandler2")
    public ReturnT refreshKillGoodsNextDayJobHandler() {
        testService.test(2);
        log.info("test job2");
        XxlJobHelper.log("test job2");
//        XxlJobHelper.log(new RuntimeException("lala"));
        return ReturnT.SUCCESS;
    }
}
